package com.piece.core.framework.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;

/**
 * 多租户配置
 */
@Data
@RefreshScope
@Configuration
@ConfigurationProperties(prefix = "spring.async")
public class AsyncProperties {

    /**
     * 线程池维护线程的最小数量.
     */
    private int corePoolSize = 10;

    /**
     * 线程池维护线程的最大数量
     */
    private int maxPoolSize = 200;

    /**
     * 队列最大长度
     */
    private int queueCapacity = 10;

    /**
     * 延迟时间
     */
    private int delayTime = 10;

    /**
     * 线程池前缀
     */
    private String threadNamePrefix = "piece-executor-";
}
